#ifdef HERZELEID_DESKTOP
 #if _MSC_VER
  #pragma once
 #endif

 #ifndef __HERZELEID_POINTERPOINTPROPS_INCLUDED__
  #define __HERZELEID_POINTERPOINTPROPS_INCLUDED__
  #include "HerzeleidPointerUpdateKind.hxx"
  #include "HerzeleidRect.hxx"

HerzeleidUIInputNamespaceBegin
	class PointerPoint; TinyTypeDecl( PointerPoint );
HerzeleidUIInputNamespaceEnd

// Provides extended properties for a PointerPoint object.
HerzeleidUIInputNamespaceBegin class PointerPointProperties
{
	friend class PointerPoint;

protected:
	
	typedef HerzeleidFoundationNamespaceImpl::Rect Rect;			// Rect type shortcut
	typedef PointerUpdateKind UpdateKind;							// Update type shortcut
	TinyTypeDecl( UpdateKind );
	TinyTypeDecl( Rect );
	
	Rect m_ContantRectRaw;											// The bounding rectangle of the raw input (typically from touch input).
	Rect m_ContantRect;												// The bounding rectangle of the contact area (typically from touch input).
	UpdateKind m_ePointerUpdateKind;								// The kind of pointer state change.
	Int32 m_iMouseWheelDelta;										// The change in wheel button input from the last pointer event.
	Float32 m_fOrientation;											// Stores the counter-clockwise angle of rotation around the major 
	Float32 m_fTwist;												// Stores the clockwise rotation in degrees of a pen device around its own major 
	Float32 m_fPressure;											// Stores a value that indicates the force that the pointer device (typically a pen/stylus) exerts on the surface of the digitizer.
	Float32 m_fXTilt;												// Stores the plane angle between the Y-Z plane and the plane that contains the Y axis and the axis of the input device (typically a pen/stylus).
	Float32 m_fYTilt;												// Stores the plane angle between the X-Z plane and the plane that contains the X axis and the axis of the input device (typically a pen/stylus).
	Bool m_bIsCancelled;											// Stores a value that indicates whether the input was canceled by the pointer device.
	Bool m_bIsInRange;												// Stores a value that indicates whether the physical entity (finger or pen) is in range of the digitizer.
	Bool m_bPrimary;												// Whether the input is from the primary pointer when multiple pointers are registered.
	Bool m_bIsBarrelButtonPressed;									// Stores a value that indicates whether the barrel button of the pen/stylus device is pressed.
	Bool m_bTiltMouseWheel;											// Whether the input is from a mouse tilt wheel.
	Bool m_bIsInverted;												// Stores a value that indicates whether the digitizer pen is inverted.
	Bool m_bIsEraser;												// Stores a value that indicates whether the input is from a digitizer eraser.

public:

	PointerPointProperties();

	DeclGetPropOnly( RectConstPtrConst, ContantRect );				// Gets the bounding rectangle of the contact area (typically from touch input).
	DeclGetPropOnly( RectConstPtrConst, ContantRectRaw );						// Gets the bounding rectangle of the raw input (typically from touch input).
	DeclGetPropOnly( UpdateKindConst, PointerUpdateKind );			// Gets the kind of pointer state change.
	DeclGetPropOnly( Int32Const, MouseWheelDelta );					// Gets a value (the raw value reported by the device) that indicates the change in wheel button input from the last pointer event.
	DeclGetPropOnly( Float32Const, XTilt );							// Gets the plane angle between the Y-Z plane and the plane that contains the Y axis and the axis of the input device (typically a pen/stylus).
	DeclGetPropOnly( Float32Const, YTilt );							// Gets the plane angle between the X-Z plane and the plane that contains the X axis and the axis of the input device (typically a pen/stylus).
	DeclGetPropOnly( Float32Const, Twist );							// Gets the clockwise rotation in degrees of a pen device around its own major. 
	DeclGetPropOnly( Float32Const, Orientation );					// Gets the counter-clockwise angle of rotation around the major 
	DeclGetPropOnly( Float32Const, Pressure );						// Gets a value that indicates the force that the pointer device (typically a pen/stylus) exerts on the surface of the digitizer.
	DeclGetPropOnly( BoolConst, IsHorizontalMouseWheel );			// Gets a value that indicates whether the input is from a mouse tilt wheel.
	DeclGetPropOnly( BoolConst, IsLeftButtonPressed );				// Gets a value that indicates whether the input is from the left button of a mouse or other input method.
	DeclGetPropOnly( BoolConst, IsRightButtonPressed );				// Gets a value that indicates whether the input is from the right button of a mouse or other input method.
	DeclGetPropOnly( BoolConst, IsMiddleButtonPressed );			// Gets a value that indicates whether the input is from the middle button of a mouse or other input method.
	DeclGetPropOnly( BoolConst, IsXButton1Pressed );				// Gets the pressed state of the first extended mouse button.
	DeclGetPropOnly( BoolConst, IsXButton2Pressed );				// Gets the pressed state of the second extended mouse button.
	DeclGetPropOnly( BoolConst, IsPrimary );						// Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered.
	DeclGetPropOnly( BoolConst, IsBarrelButtonPressed );			// Gets a value that indicates whether the barrel button of the pen/stylus device is pressed.
	DeclGetPropOnly( BoolConst, IsInverted );						// Gets a value that indicates whether the digitizer pen is inverted.
	DeclGetPropOnly( BoolConst, IsInRange );						// Gets a value that indicates whether the physical entity (finger or pen) is in range of the digitizer.
	DeclGetPropOnly( BoolConst, IsCancelled );						// Gets a value that indicates whether the input was canceled by the pointer device.
	DeclGetPropOnly( BoolConst, IsEraser );							// Gets a value that indicates whether the input is from a digitizer eraser.

	DeclConstTypedGetterFor( RectConstPtrConst, ContantRect ) { return &m_ContantRect; } // Gets the bounding rectangle of the contact area (typically from touch input).
	DeclConstTypedGetterFor( RectConstPtrConst, ContantRectRaw ) { return &m_ContantRectRaw; } // Gets the bounding rectangle of the raw input (typically from touch input).
	DeclConstTypedGetterFor( UpdateKindConst, PointerUpdateKind ) { return m_ePointerUpdateKind; }	// Gets the kind of pointer state change.
	DeclConstTypedGetterFor( Int32Const, MouseWheelDelta ) { return m_iMouseWheelDelta; } // Gets a value (the raw value reported by the device) that indicates the change in wheel button input from the last pointer event.
	DeclConstTypedGetterFor( Float32Const, XTilt ) { return m_fXTilt; } // Gets the plane angle between the Y-Z plane and the plane that contains the Y axis and the axis of the input device (typically a pen/stylus).
	DeclConstTypedGetterFor( Float32Const, YTilt ) { return m_fYTilt; } // Gets the plane angle between the X-Z plane and the plane that contains the X axis and the axis of the input device (typically a pen/stylus).
	DeclConstTypedGetterFor( Float32Const, Twist ) { return m_fTwist; } // Gets the clockwise rotation in degrees of a pen device around its own major.  
	DeclConstTypedGetterFor( Float32Const, Orientation ) { return m_fOrientation; } // Gets the counter-clockwise angle of rotation around the major 
	DeclConstTypedGetterFor( Float32Const, Pressure ) { return m_fPressure; } // Gets a value that indicates the force that the pointer device (typically a pen/stylus) exerts on the surface of the digitizer.
	DeclConstTypedGetterFor( BoolConst, IsHorizontalMouseWheel ) { return m_bTiltMouseWheel; } // Gets a value that indicates whether the input is from a mouse tilt wheel.
	DeclConstTypedGetterFor( BoolConst, IsPrimary ) { return m_bPrimary; } // Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered.
	DeclConstTypedGetterFor( BoolConst, IsBarrelButtonPressed ) { return m_bIsBarrelButtonPressed; } // Gets a value that indicates whether the barrel button of the pen/stylus device is pressed.
	DeclConstTypedGetterFor( BoolConst, IsInverted ) { return m_bIsInverted; } // Gets a value that indicates whether the digitizer pen is inverted.
	DeclConstTypedGetterFor( BoolConst, IsInRange ) { return m_bIsInRange; } // Gets a value that indicates whether the physical entity (finger or pen) is in range of the digitizer.
	DeclConstTypedGetterFor( BoolConst, IsCancelled ) { return m_bIsCancelled; } // Gets a value that indicates whether the input was canceled by the pointer device.
	DeclConstTypedGetterFor( BoolConst, IsEraser ) { return m_bIsEraser; } // Gets a value that indicates whether the input is from a digitizer eraser.

	DeclConstTypedGetterFor( BoolConst, IsLeftButtonPressed )	// Gets a value that indicates whether the input is from the left button of a mouse or other input method.
	{
		return( m_ePointerUpdateKind & PointerUpdateKind::LeftButtonPressed );
	}

	DeclConstTypedGetterFor( BoolConst, IsRightButtonPressed ) // Gets a value that indicates whether the input is from the right button of a mouse or other input method.
	{
		return( m_ePointerUpdateKind & PointerUpdateKind::RightButtonPressed );
	}

	DeclConstTypedGetterFor( BoolConst, IsMiddleButtonPressed ) // Gets a value that indicates whether the input is from the middle button of a mouse or other input method.
	{
		return( m_ePointerUpdateKind & PointerUpdateKind::MiddleButtonPressed );
	}

	DeclConstTypedGetterFor( BoolConst, IsXButton1Pressed ) // Gets the pressed state of the first extended mouse button.
	{
		return( m_ePointerUpdateKind & PointerUpdateKind::XButton1Pressed );
	}

	DeclConstTypedGetterFor( BoolConst, IsXButton2Pressed ) // Gets the pressed state of the second extended mouse button.
	{
		return( m_ePointerUpdateKind & PointerUpdateKind::XButton2Pressed );
	}

} HerzeleidUIInputNamespaceEnd; 

HerzeleidUIInputNamespaceBegin
	TinyTypeDecl( PointerPointProperties );
HerzeleidUIInputNamespaceEnd;

 #endif // !__HERZELEID_POINTERPOINTPROPERTIES_INCLUDED__
#endif // !__HERZELEID_DESKTOP
